home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d19
/
pcbucr24.arc
/
PCBUCR.DOC
< prev
next >
Wrap
Text File
|
1988-05-31
|
22KB
|
612 lines
PCBOARD User Credit System Ver. 2.4
PCBOARD User Credit System Ver. 2.4
CopyWrite (c) 1988
By David Cantere
(Sysop) Technoids Anonymous
(602) 899-4876
Disclaimer:
This program is being released into Public Domain. I give
no warranty of any kind. But will do what I can to help if you
have problems. This program does access your users file and
caller's log. I would recommend that you backup both files
before you run the program for the first time.
The program is released as two separate files.
PCBUCRxx.EXE -- Contains full self contained code.
PCBUxx.EXE -- Full program but requires BRUN40.EXE.
1
PCBOARD User Credit System Ver. 2.4
What PCBUCR Does:
PCBOARD User Credit System is a program designed to allow
the sysop to give or remove both upload and download credits
based on entries found in the callers log. You tell the program
what different strings to find in the callers log and it will
accumulate totals for each user. Using those totals you can give
or remove both upload and download credits based on ratios 2 to
1, 3 to 2, 4 to 3......etc. You can tell the program only give
credit if d/l exceeds u/l and more.
How PCBUCR Works:
The program reads the callers log and stores each login name
plus totals for each search string you have entered. Every time
it finds a user who has one of the search strings you've entered
in the log it stores the users name and a value one (1) to
PCBUCR.FIL. Upon completion the program then sorts the file by
user name and totals up each user. Thus ending up with a user's
name and how many times one of your search strings was found in
the callers log. Individual total's are stored for each search
string in the .DAT file. At this point the users file is updated
using the ratio you entered. But only if you have the switch
turned on in the PCBUCR.DAT file. Anything left over will be
saved in the PCBUCR.FIL file and merged in with the results from
the next run.
After each successful run the program will store the last
log entry it found to a file called PCBUCRx.CFG. Each time you
run the program it will search backwards for the last entry
stored in this file and start counting from there. This way the
program can run each night in the event timer and take a minute
or so to run and store totals (Update the USERS file at the same
time as well). This also prevents a string in the ".dat" file
from being counted more than once thus giving a user more credits
than he/she has earned.
NOTE: Even if you are running under a single node
environment the program will still use numbers when
creating the 'PCBUCRx.cfg' files.
If a user is note found in the users file then all credits
for that users will be removed from 'PCBUCR.fil'. This way
partial totals for a user who has been removed from the users
file (for what ever reason) will note accumulate and waste space.
2
PCBOARD User Credit System Ver. 2.4
Command Line Switch(s):
(UPDATE) If you have Auto update turned off in the
PCBUCR.DAT file. You can use the UPDATE switch to
run a direct update bypassing everything else.
This switch will work regardless of the setting of
the AUTO UPDATE switch in the .DAT file so it can
be manually run at any time. I recommend to run
with auto update turned off and do it manually the
first few times to make sure everything works
properly. As always when running a new release of
a program you should make a backup before running
it for the first time.
Format C>PCBUCR UPDATE
(PURGE) This works the same as (UPDATE) with one exception.
When performing updates all users are searched for
even if they don't have enough credits stored for
the search string entered. This allows you to
clean up the .DAT file and remove users who don't
exist in the users file but don't have enough
credits stored for PCBUCR to search for them. This
only occurs when a ration of 2 to 1 or higher is
used. You shouldn't need to run this to often but
I recommend you use it right after you do a pack on
the users file and remove old or deleted users.
Format C>PCBUCR PURGE
Installing PCBUCR:
For the most part the program is not that hard to setup.
But to let you know it does create and maintain several files of
its own. PCBUCR.FIL, PCBUCRx.CFG, PCBUCR.LOG and PCBUCR.DAT.
PCBUCR.FIL:
The first PCBUCR.FIL maintains an accumulation of totals
based on the search strings you have entered in the .DAT file.
There is a separate total for each search string entered and each
one has its own ratio to use while performing an update on the
user.
PCBUCRx.CFG:
PCBUCRx.CFG contains the last stored log entry found in the
caller's log the last time the program ran. There can be more
than one of this file each one substituting a number in place of
the letter (x). This number is determined by it's
3
PCBOARD User Credit System Ver. 2.4
position in the ".DAT" file. This allows the program to keep
track of each callers log separately so you don't have to play
around with multiple .dat files in different directories or
something like that.
PCBUCR.LOG: (optional)
PCBUCR.LOG contains a log of what updates are performed each
time the program run's in update mode. This log is optional.
You can turn it on or off in the .dat file. You also have the
option of specifying the name and location of the log file. This
file append's during each run so you can see what updates were
performed on each user. At the top is the name of the users file
the date and the time the program started its update. Each user
that was updated is then listed with a detail list of numbers to
tell you what was updated and by how much. The first three
numbers are credits accumulated, uploads and downloads before any
update is performed. The second three numbers are the results
after the update. Each column is formatted to hold numbers as
high as '99,999'. The last entry is the time at which the
program ended its update operation. You can then figure out just
how long the program is taking to perform its updates each time
you run it.
Configuring PCBUCR.DAT:
The following is a sample file!
Beginning Of File
1 19 5000 256 1 25 146 2 148 2
c:\p\main\CALLER
c:\p\main\users
Y
Y c:\pcb\main\pcbndx.
Y c:\pcb\gen\blt6 (defaults to PCBUCR.LOG)
5
2 1 2 AA
Message Left
1 1 1 BA
New - Adventure
1 1 1 CD
(D) TAFILES.ARC Completed
1 1 1 DA
* NEW USER *
1 1 1 EA
Questionnaire (1)
END OF FILE
4
PCBOARD User Credit System Ver. 2.4
Line #1)
The first number is the number of callers log's you want to
track. You must have an equal number of entries starting on line
2 that match this number or the program will not work correctly
and could possible do major damage to your users file.
The second number is the offset position of the users name
in the log string of the callers log. As of release 12.1, 19 is
used for single node systems and 22 for multi-node systems were
the node number is included in the log string.
The third is the size of the sort buffer I've defaulted it
at 5000 and that should more than handle the job. But if you
find it doesn't you can increase the number. I haven't test on
just how high you can go so your on your own if you play around
with it.
Be very careful changing the rest of these numbers. They
contains information on the location of the upload, download and
length of your users file.
The fourth number contains the record length of your users
file. 5 & 6 are the starting Position and length of the users
full name field. 7 & 8 contain the starting position and length
of the users upload field and 9 & 10 contain the starting
position and length of the users download field. These numbers
will only need to be changed in the event the users file is
modified witch will happen when PCBoard 14.0 is released. I
purposely placed these values outside of the program for easy
modification when needed so PCBUCR could be modified for most
future release of PCBOARD without worrying about updates.
Line #2)
Contains the name and location of your CALLERS log. If you
are tracking more than one (1) log. Then line #3 gets pushed
down (1) line for each callers log you have entered. Make sure
the number of logs you enter equal the first number on line #1.
NOTE: If you add another node just increase the first
parameter by one and add it the the list. A new ".cfg"
file will be created the first time you run it.
Line #3)
Contains the name and location of your USERS file. Fully
supports paths.
5
PCBOARD User Credit System Ver. 2.4
Line #4)
Allows you the sysop to tell the system if you want it to
automatically update the users file each time the program run's.
If you select "Y" then each time the program runs it will go
threw the USERS file and update each user's credit's by the ratio
you entered for the string that generates the credit. If "N"
then the program will accumulate totals each day and store them.
At this point the only way to update the users is to use the
command line switch UPDATE. (See command line switches)
Line #5)
Tells PCBUCR if you want it to use pcboards quick index
files. If you elect to use this then it must be followed by the
path location and the first half of the name of the index files.
The PCBUCR will added the alphabetic character when opening the
appropriate index file. You need to add the "." separating the
first half of the name from the .ext. If you don't specify the
index path and name PCBUCR will automatically scan the users file
instead. In the event PCBUCR finds a discrepancy in the index
(i.e. the index doesn't match the record in the users file) if
will perform a scan on the users file in an attempt to find the
user.
Line #6)
IF set to 'Y', this switch tells the program to log each
update run to the default file called 'PCBUCR.LOG'. If you wish
to use a different name then you can specify it on the same line.
Full path's are supported. Be sure you put at least one space
between them.
The name of the users file plus the time and date of the run
are entered at the beginning of each run followed by the users
who are being updated. Each update line contains the users name,
search string i.d., type of update to perform followed by 6
columns of numbers. The first 3 numbers are 1) the number of
credits accumulate for the search string. 2) the users current
upload value and 3) the users download value. Number's 4,5 & 6
are the same numbers but after being updated. IF this switch is
set to 'N' then this log is not created or updated during the
running of the program.
Line #7)
This value indicates the number of strings to be searched
for. It should be equal to the number of items you want the
system to look for and accumulate totals for while reading your
callers log. The remaining lines contain the search strings and
what to do with them.
6
PCBOARD User Credit System Ver. 2.4
Search Strings
Each search string will occupy two lines. One for the
parameters to follow for the search string totals and the other
is the search string itself.
The first line contains 3 sets of numbers and 2 letters.
The first to numbers are the ratio to use when giving credit to a
user. The first number of the ration is how many credits the user
must accumulate before giving he/she the proper credits. Those
credits given is the contence of the second number. So if you
enter a ratio of 3 2. This means that for every 3 credits the
user has accumulate for that search string he/she gets 2 upload
or download credits added to or sub-tracted from he/she's current
total's in the users file. You can use any ratio that fits your
needs, 5 TO 3, 3 TO 5, 3 TO 1, 13 TO 3....etc. It should work
with any combination. Just be sure to separate the 2 numbers by
at least one space for proper operation of the program. Also
when removing upload or download credits the system checks to
make sure the current value's in the users records DO NOT FALL
below ZERO.
The 3rd number on the line has 3 possible affects to the
way user credits are given.
1) Always update the users upload or download credit as
long as he/she has earned enough credits for it.
2) Same as one but will only update as long as uploads DO
NOT exceed downloads or until they do. Any remaining
credits are stored for later use. This allow you to
accumulate credits for user's and the system will use
those credits when the user need's them.
3) Same as two but does not accumulate totals and store them
for later use. Instead they are thrown away or deleted.
The 5th position contains a 2 letter code. They must be
upper case and they must be together. Not Spaces between them.
These two letters are used together for grouping totals and also
to tell the program what type of credit the user is to get or
lose.
The first letter can be of your choosing using the letter
(A-Z). I use one letter for each search string and keep it in
alphabetical order. But order should make no difference also I
see no problem with using the same letter on 1 or more groupings.
They will just be totaled together as one and the program wont
have to maintain two separate totals.
7
PCBOARD User Credit System Ver. 2.4
The second position can have one of four choices (A,B,C or
D). These letters are used to tell the program what type of
credit to give or take away.
A = Give Upload credit for this search string
B = Remove upload credit for this search string
C = Give download credit for this search string
D = Remove download credit for this search string
B & D will not allow the upload or download credit to fall
below zero. Also Be sure it's in upper case.
The second line contains your text string for the program to
search for. Your search strings can contain punctuation marks or
anything else you want but it is limited to 62 characters (the
record size of the caller log records minus the charage return
and line feed's on the end). In order for it to work you must
make your entries exactly as in the callers log. This includes
upper and lower case spaces everything. But do remember you only
need enough of the line to make it unique to other strings that
could be places in the log. The search used is an in-string
search so matches don't have to be exact but, your search string
must be contained with in the log entry for a match to occur.
8
PCBOARD User Credit System Ver. 2.4
REVISION HISTORY:
07-08-1987 Official release of version 1.0
10-30-1987 Release (BETA 2.0)
* Modified to support 12.0 callers logs
02-08-1988 Release 2.1
* Modified To support 12.1 Callers logs
* Now supports multiple caller log's. You can read and track
more than 1 callers log. It should be able to handle 1 to
99 log's at a time. Probably more.
* Documentation updated for 12.1 release.
03-17-1988 Release 2.2
* Changed PCBUCR.DAT file and PCBUCR.FIL. You will have to
delete your PCBUCR.FIL file as the new format wont work with
the data currently stored.
* Now individual control over each search string. Separate
ratios and individual totals of each string.
* The ability to give or take away upload and download
credits.
* Stores results of last update (only) for later viewing or
verification of proper updates. To a file caller
PCBUCR.LOG. This file was created mainly for debug
purposes.
05-01-1988 Release 2.3 (never released)
* Formatted Columns for output of UPDATE function to screen
and to log file. Number fields are format to support
numbers as high as '99,999'.
* Log output will now append each time the programs runs
instead of overwriting each time.
* Log format has been cleaned up and is report slightly
differently from that output to the screen. The data
displayed is the same.
* Documentation has been re-written and is formatted for most
standard printers.
9
PCBOARD User Credit System Ver. 2.4
05-16-88 Release 2.4
* Added support for pcboard quick index files
* Added the ability to set the name of the output log provided
the log switch is turned on.
* Cleaned up internal update loops to prevent uploads from
exceeding downloads when you have activated the switch only
update if uploads do not exceed downloads.
* Added Purge option on command line switches to clean out the
.FIL file when ration of 2 to 1 or greater is used.
* Made a few changes in the .DAT file. DO NOT run this
release with .DAT file's used in version prior to 2.4.
Features To Add!:
Max and Min security levels to store and accumulate totals for.
Give me some feed back and some ideas to add to the program.
I've tested the program with the sample file and a few
variation. I don't think i've missed anything but if you find
something please let me know.
Sysop Technoids Anonymous
David Cantere
(602) 899-4876
Mailing address:
David Cantere
P.O. Box 1464
Chandler, Az 85244-1464
10